package com.liu.algorithm03;

import java.util.Scanner;

public class reverseString {
    // 反转字符串中的字符
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        StringBuilder sb = new StringBuilder(str);
        System.out.println(sb.reverse());
        reverse(str);
    }
    public static void reverse(String str){
        char[] chars = str.toCharArray();
        String c = "";
        for (int i = chars.length - 1; i >= 0; i--) {
            c += chars[i];
        }
        System.out.println(c);
    }
}
